
<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection" />
    <meta content="emai=no" name="format-detection" />
    <link rel="stylesheet" type="text/css" href="<?php echo STATIC_HOST;?>shared/css/shared.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo STATIC_HOST;?>shared/css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo STATIC_HOST;?>basic/css/product.css" />
    <script type="text/javascript" src="<?php echo STATIC_HOST;?>shared/js/zepto-1.1.6.js"></script>
    <script async="" charset="UTF-8" src="//static.meiqia.com/dist/meiqia.js?v=20"></script>
    <script type="text/javascript" src="<?php echo STATIC_HOST;?>shared/js/swiper.min.js"></script>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <title>芝士妈妈在线</title>
    <script type='text/javascript'>
        (function(m, ei, q, i, a, j, s) {
            m[a] = m[a] || function() {
                    (m[a].a = m[a].a || []).push(arguments)
                };
            j = ei.createElement(q),
                s = ei.getElementsByTagName(q)[0];
            j.async = true;
            j.charset = 'UTF-8';
            j.src = i + '?v=' + new Date().getUTCDate();
            s.parentNode.insertBefore(j, s);
        })(window, document, 'script', '//static.meiqia.com/dist/meiqia.js', '_MEIQIA');
        _MEIQIA('entId', '20405');
        _MEIQIA('withoutBtn');
        _MEIQIA('init');
    </script>
    <script>
        function onBridgeReady() {
            WeixinJSBridge.call('showOptionMenu');
        };

        if (typeof WeixinJSBridge == "undefined") {
            if (document.addEventListener) {
                document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
            } else if (document.attachEvent) {
                document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
                document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
            }
        } else {
            onBridgeReady();
        }

        wx.config({
            debug: false,
            appId: '<?php echo $jsapi['js_config']['appId']?>',
            timestamp: <?php echo $jsapi['js_config']['timestamp']?>,
            nonceStr: '<?php echo $jsapi['js_config']['noncestr']?>',
            signature: '<?php echo $jsapi['js_config']['signature']?>',
            jsApiList: [
                'onMenuShareTimeline',
                'onMenuShareAppMessage'
            ]
        });

        wx.ready(function () {
            wx.onMenuShareTimeline({
                title: '<?php echo $jsapi['share_title'];?>',
                link: '<?php echo $jsapi['share_url']?>', // 分享链接
                imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
                success: function () {
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });

            wx.onMenuShareAppMessage({
                title: '<?php echo $jsapi['share_title']?>',
                desc: '<?php echo $jsapi['share_content'];?>', // 分享描述
                link: '<?php echo $jsapi['share_url']?>', // 分享链接
                imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
                type: 'link', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function () {
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });
        });
    </script>
</head>

<body>
<div class="wrapper">
    <div class="swiper-container swiper-banner">
        <div class="swiper-wrapper">
            <?php foreach($product_jpg as $k=>$v){ ?>
                <div class="swiper-slide">
                    <img src="<?php echo  STATIC_IMAGE.'upload/product_jpg/'.$v['jpg_imgurl'] ?>" alt="" />
                </div>
            <?php } ?>
        </div>
        <?php if (sizeof($product_jpg) > 1): ?>
        <div class="swiper-pagination"></div>
        <?php endif;?>
    </div>
    <div class="info">
        <h1><?php echo $product['product_name'] ?></h1>
        <p class="desc"><?php echo $product['short_description'] ?></p>
        <p><span class="price">&yen; <?php echo $product_price;?></span>市场价<span class="old-price">&yen; <?php echo $product['market_price'] ?> </span></p>
        <p><?php if(isset($discount_price)):?><font color="red">（已享受好友推荐折扣<?php echo $discount_price?>元）</font><?php endif;?></p>
        <p>快递：<span class="express">免运费</span></p>
    </div>
    <div class="content">
        <?php echo $product_html['home_html'] ?>
    </div>
</div>
<footer>
    <ul class="flex-wrapper flex-align-center">
        <li class="btn-help">
            <a href="javascript:void(0)" onclick="_MEIQIA('showPanel')" class="help-link">
                <img src="<?php echo STATIC_HOST;?>basic/img/i_help.jpg" />在线客服
            </a>
        </li>
        <li class="btn-buy flex-1">
            <a href="javascript:zsmm.Popup.New($('.popup-cart'))" class="btn btn-blue">立即购买</a>
        </li>
    </ul>
</footer>
<div class="hide popup-cart">
    <span class="close"><img src="<?php echo STATIC_HOST?>gene/img/i_close.png" alt="" class="fullscreen" /></span>
    <form action="/sale/order/quick-add" method="get">
        <input type="hidden" name="product_id" value="<?php echo $product['product_id'] ?>">
        <header>
					<span class="avatar">
                    <?php echo $product_html['product_img'] ?>
                </span>
            <span class="price">&yen; <?php echo $product_price;?></span>
        </header>
        <div class="count clear">
            <p class="count-select">
                <button onclick="if(num.value>1) num.value--">-</button>
                <input type="number" name="num" value="1" min="1" />
                <button onclick="num.value++">+</button>
            </p>
            <label>购买数量</label>
        </div>
        <button type="submit" onclick="form.submit();">确 认</button>
    </form>
</div>
<script type="text/javascript" src="<?php echo STATIC_HOST?>shared/js/shared.js"></script>
<script type="text/javascript" src="<?php echo STATIC_HOST?>basic/js/product.js"></script>
</body>

</html>